đ PSYCH 413 Midterm Exam
Due Wednesday Oct 22nd by 12:30 p.m.
General
- Please submit your responses as a nicely formatted notebook (.ipynb) file.
- If your answer includes many decimal places (e.g., 3.14159265358979), please round it to a reasonable number of decimals for readability (typically 3 to 4).
- For ease of marking, avoid showing the outputs of unnecessary values.
- Make sure your code runs without errors and shows all required outputs.
- Good coding style mattersâ clean, organized, and well-commented code will be rewarded. Disorganized, redundant, or poorly structured code may lose marks.
Requirements:
- Unless otherwise specified, set any trimming you need to do at 20% and use an \(\alpha = 0.05\).
- Unless the instructions explicitly state otherwise (e.g., âassume the data are normally distributedâ), you are responsible for checking whether the assumptions of the method are reasonable and robust approaches need to be used.
- If classical test assumptions are not violated, use the classical test.
Plots, Packages, and Functions:
- All plots must be made with ggplot2 and include clear, descriptive axis titles rather than default column names.
- Only the following packages are permitted:
tidyverseWRS2
- Unless stated otherwise, The following functions are not permitted:
IQRquantile()mad()t.test()yuen()trimse()
Question 1
Figure 1. Candy Corn (Confectio tricoloris)
You hypothesize that candy cornâa small (approx. 0.5g), triangular Halloween candy with white, orange, and yellow layers (see Figure 1)â is only enjoyable in small doses: after a few pieces, people slow down their consumption.
You record how long (in seconds) it takes each participant to eat five pieces of candy corn at two doses: 1) before eating any pieces, and 2) after eating 20 peices. The data is in candy_corn.csv.
Based on the results, is there evidence that participantsâ candy corn eating speed changes after theyâve already eaten several pieces? Conduct an appropriate statistical test that evaluates whether or not your hypothesis should be accepted.
Report the following:
- The null & alternative hypothesis.
- Test-statistic
- Degrees of Freedom
- P-value
- Confidence Interval
- Conclusion
Question 2
Every Halloween, your instructor grows a patch of pumpkins to use as lecture props.
This year, he recorded the weights (in kilograms) of every pumpkin grown in the patch and plotted them in the histogram below. Use the histogram to estimate what \(\mu\) and \(\sigma\) are.
The histogram is divided into bins covering a 1-kg range. The lower bound of each range is inclusive, and the upper bound is exclusive (e.g., the first bin spans 1 †x < 2).
Question 3
Building on the previous question, use a robust method of outlier detection to uncover any âunusually spookyâ pumpkin weights:
- Identify which weights are classified as outliers.
- Report how many pumpkins correspond to each outlier weight.
Question 4
In the 1930s, Joseph Rhine at Duke University conducted famous âexperimentsâ on extrasensory perception (ESP) using Zener cards â a deck of 25 cards with five repeating symbols (circle, star, wavy lines, square, cross). Participants tried to predict the symbol on each unseen card.
In a modern replication of Rhineâs work, over 1000 participants (N = 1329) attempted to predict 25 Zener cards each on an online version of the task.
The number of correct guesses follows an approximately normal distribution with a \(\bar{x} = 5\) and a \(s = 2\), which corresponds to chance expectations.
a.
Dr. Rhineâs team classifies anyone in the top 5% of scores as a potential âpsychic.â
What is the minimum number of correct guesses required to be in this top 5%?
b.
The Amazing Criswell, the flamboyant psychic who once warned that âthe future is where we will spend the rest of our lives,â scored 2.5 standard deviations below the mean. What was his score?
c.
Miss Cleo, a famous late-night television psychic, correctly identified 9 cards on the task. What percentile does her score correspond to and why is problematic to refer to her as psychic given her results in this study?
Question 5
Researchers studying Halloween happiness propose that dopamine (DA) levels change when people eat candyâbut they wonder whether this effect depends on whether the candy is their favourite or not.
To test this, they have participants wear a portable dopamine sensor. In one treatment participants eat a mini chocolate bar from their personal top-three favourite candies. In another treatment they eat a random candy drawn from a generic Halloween mix (e.g., candy corn, licorice, or a mystery taffy). Dopamine change in nanomoles per liter (nmol/L) is recorded for 10 minutes after each treat.
The data can be found in dopamine.csv.
Do these results provide convincing evidence that dopamine levels change after eating favourite candy than random Halloween candy? Clearly state the null and alternative hypotheses, perform an appropriate statistical test.
Report the following:
- The null & alternative hypothesis.
- Test-statistic
- Degrees of Freedom
- P-value
- Confidence Interval
- Conclusion
Question 6
Plot a bar graph of the previous questionâs results such that the signficance of the test can be evaluated. Use confidence intervals for the error bars.
Display a dataframe that includes only the mean and the lower and upper bounds of the interval for each treatment. Do not include any additional statistics in the output.
Question 7
A psychologist collects data on âtime (in seconds) spent staring at a ghost illusionâ for 12 participants and plans to test whether the mean time differs from 5 s. A histogram of the results shows one participant spent 50 s staring, while all others are between 3â8 s. i.e., there is one clear outlier.
a.
Would this extreme value affect an assumption of normality? If so, how?
b.
Would a classic t-test be appropriate (why or why not)? If not, how should the outlier be dealt with?
Question 8
a.
A university student named Frank Stein scores 90% on an exam. Assume the results follow a normal distribution with a mean of 95% and a standard deviation of 3%. Should this student be proud of their score?
b.
Suppose another exam given by a different instructor teaching the same course has a much lower average (e.g., 85%) but similar variability. Could the same raw score of 90% indicate a very different level of performance? Why or why not?
c.
At the University of Alberta, grades are formally defined according to the following descriptors:
- A± = Excellent
- B± = Good
- C± = Satisfactory
- D+ = Poor
- D = Minimal Pass
- F = Failure
Instructors are responsible for converting numerical performance into letter grades. Based on the Universityâs official grade descriptors, what letter grade do you think would be fair to assign to Frank on the first exam (from question âaâ)? There is no single correct answer, but you should justify your reasoning.
Question 9
A recent article in the prestigious journal of Techno-Terrors and Teen Minds has raised concern that excessive smartphone use is transforming young adults into âdigital zombies.â According to one particularly chilling report, members of Gen Z (ages 13â28) spend an average of 6 hours per day staring at their glowing screensâroughly the same amount of time classic movie zombies spend wandering aimlessly.
You decide to test whether this eerie claim holds true. You obtain a random sample of daily screen-time data from a group of Gen Z aged users (see zombie_screentime.csv).
Conduct an analysis to evaluate this, do you believe the âdigital zombieâ claim is exaggerated or plausible?
You are allowed to use any R function(s) you would like for this question (though you are not permitted to install other packages beyond what is stated in the instructions).
Question 10
a.
A neuroscientist records brain temperature (in Celsius) before and after a task. What scale of measurement does this involve?
b.
Participants are asked to rank a series of images based on how emotionally disturbing they find them, from least to most disturbing. What scale of measurement is this?
c.
Suppose you record the number of times a neuron fires per second in response to a stimulus. What scale of measurement does this represent?
d.Â
What scale of measurement would differences between rates of neuron firing be?
e.
You measure the amount of dopamine (in nanograms per milliliter) present in a ratâs nucleus accumbens after exposure to a drug. What scale of measurement is this?
f.
You group EEG data based on whether the participant was in a resting, task, or sleep condition. What scale of measurement is this?
g.
A researcher counts how many milliseconds it takes participants to identify an image of a fearful face. What scale of measurement is used?
h.
Subjects rate their pain during a mild electric shock using a 5-point scale from âno painâ to âextreme painâ. What kind of measurement scale is this?
i.
In a memory experiment, participants are categorized based on the brain region that showed the most activation (e.g., hippocampus, amygdala, prefrontal cortex). What scale of measurement does this reflect?